#include <cmath>
#include <string.h>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;

int num[26];
int main() {
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
    string src;
    getline(cin,src);
    memset(num,0,sizeof(num));
    for(int i=0;i<src.length();i++){
        if(src[i]>='a'&&src[i]<='z'){
            int pos=(int)(src[i]-'a');
            num[pos]=1;
            continue;
        }
        if(src[i]>='A'&&src[i]<='Z'){
            int pos=(int)(src[i]-'A');
            num[pos]=1;
            continue;
        }
    }
    for(int i=0;i<26;i++){
    	cout<<num[i]<<endl;
        if(num[i]==0){
            cout<<"not pangram"<<endl;
            return 0;
        }
    }
    cout<<"pangram"<<endl;
    return 0;
}

